// 子组件
<template>
    <p>儿子: {{ leyoData }}</p>
    <GrandSon/>
</template>

<script>
import { inject } from 'vue'
import GrandSon from './GrandSon.vue'
export default {
  name: 'provide/inject',
  components: { GrandSon },
  setup () {
    const leyoData = inject('leyoData')
    return {
      leyoData
    }
  }
}
</script>
